﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace GylCSharpUtils.GSerializer.Abstract {

    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
    public class GSerialIgnore : Attribute {

        public static bool Ignore(PropertyInfo prop) {
            if(prop == null) return true;
            if(prop.GetCustomAttribute<GSerialIgnore>() != null) return true;
            return false;
        }
        public static bool Ignore(FieldInfo field) {
            if(field == null) return true;
            if(field.GetCustomAttribute<GSerialIgnore>() != null) return true;
            return false;
        }
    }
}
